﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HeroDream
{
    /// <summary>
    /// 任务类型
    /// </summary>
    public enum TaskType
    {
        /// <summary>
        /// 基础任务类型
        /// </summary>
        Basic,

        /// <summary>
        /// 杀怪任务类型
        /// </summary>
        Battle,

        /// <summary>
        /// 护送任务类型
        /// </summary>
        Convoy,

    }

    class Task
    {
        protected int id;

        public int Id => id;

        protected string des;

        protected int coin;

        protected int time;

        public int Time => time;

       protected TaskType type;

        public TaskType Type => type;


        /* public int Time
         { 
             get {
                 return time;
             }
         }*/

        public Task(int send)
        {
            type = TaskType.Basic;
        }


        public void OutPut()
        {
            Console.WriteLine($"{des} 奖励:{coin} 耗时:{time}");
        }

        /// <summary>
        /// 执行任务
        /// </summary>
        /// <param name="hero">任务执行人</param>
        public virtual void TaskRun(Hero hero)
        {
            Console.WriteLine($"{hero.Name}正在执行任务{des}");
            hero.age += time;
            hero.Coin =hero.Coin+ coin;

        }

    }
}
